SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE PROCEDURE [dbo].[DnnProduct_CDS_DistributorConfigUpdate]
	@ID int,
	@DistributorID varchar(50),
    @Name nvarchar(40),
    @Description nvarchar(2000),
    @DistURL varchar(254),
    @NotifyURL varchar(254),
    @SharedSecret varchar(50),
    @AllowedIPAddress varchar(254),
    @LocationDir varchar(50),
    @DownloadURLDir varchar(50),
    @DataPathDir varchar(50),
    @PWDBName varchar(50),
    @PWServerDN varchar(50),
    @MaxDownloadsReached nvarchar(4000),
    @UsePW bit,
    @AllowedWebStore varchar(254),
    @MaxLoanCount int,
    @LinkExpires int,
    @Deleted bit = 0,
    @DownloadExpired nvarchar(2000)
AS
BEGIN
	UPDATE [DISC_DistributorConfig]
	SET [DistID] = @DistributorID,
		[Name] = @Name,
		[DistURL] = @DistURL,
		[NotifyURL] = @NotifyURL,
		[SharedSecret] = @SharedSecret,
		[AllowedIPAddress] = @AllowedIPAddress,
		[LocationDir] = @LocationDir,
		[DownloadURLDir] = @DownloadURLDir,
		[DataPathDir] = @DataPathDir,
		[PWDBName] = @PWDBName,
		[PWServerDN] = @PWServerDN,
		[MaxDownloadsReached] = @MaxDownloadsReached,
		[UsePW] = @UsePW,
		[AllowedWebStore] = @AllowedWebStore,
		[Description] = @Description,
		[MaxLoanCount] = @MaxLoanCount,
		[LinkExpires] = @LinkExpires,
		[Deleted] = @Deleted,
		[DownloadExpired] = @DownloadExpired
	WHERE [ID] = @ID
END
GO
